package com.scau.fegin;

import com.scau.entity.User;
import com.scau.entity.UserVO;
import org.springframework.cloud.openfeign.FeignClient;

import org.springframework.web.bind.annotation.*;


@FeignClient(value = "user")
public interface UserFegin {


    @GetMapping("/user/login/{id}/{password}/{type}")
    public User login(@PathVariable("id") int id, @PathVariable("password") String password, @PathVariable("type") int type);

    @PostMapping(value = "/user/save")
    public void save(@RequestBody User user);

    @GetMapping(value = "user/findAll/{page}/{limit}")
    public UserVO findAll(@PathVariable("page") int page, @PathVariable("limit") int limit);

    @GetMapping(value = "/user/findById/{id}")
    public User findById(@PathVariable("id") int id);

    @PostMapping(value = "/user/update")
    public void update(@RequestBody User user);

    @GetMapping(value = "/user/changeLogoUrl")
    public void changeLogoUrl(@RequestBody User user);
}
